<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Phing API Documentation</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="css/jquery-ui.css" type="text/css"></link><link rel="stylesheet" href="css/docblox/jquery-ui-1.8.16.custom.css" type="text/css"></link><link rel="stylesheet" href="css/jquery.treeview.css" type="text/css"></link><link rel="stylesheet" href="css/theme.css" type="text/css"></link><script type="text/javascript" src="js/jquery-1.4.2.min.js"></script><script type="text/javascript" src="js/jquery-ui-1.8.2.custom.min.js"></script><script type="text/javascript" src="js/jquery.tools.min.js"></script><script type="text/javascript" src="js/jquery.cookie.js"></script><script type="text/javascript" src="js/jquery.treeview.js"></script><script type="text/javascript">
            $(document).ready(function() {
                $(".filetree").treeview({
                    collapsed: true,
                    persist: "cookie"
                });

                $("#accordion").accordion({
                    collapsible: true,
                    autoHeight:  false,
                    fillSpace:   true
                });

                $(".tabs").tabs();
            });
        </script></head><body><div xmlns="" id="content">
<script xmlns:dbx="http://docblox-project.org/xsl/functions">

      function filterElements()
      {
        inherited = !$('#show-inherited').hasClass('deselected');
        public    = !$('#show-public').hasClass('deselected');
        protected = !$('#show-protected').hasClass('deselected');
        private   = !$('#show-private').hasClass('deselected');

        $('div.public').each(function(index, val) {
            $(val).toggle(public && !($(val).hasClass('inherited_from') && !inherited));
        });
        $('div.protected').each(function(index, val) {
            $(val).toggle(protected && !($(val).hasClass('inherited_from') && !inherited));
        });
        $('div.private').each(function(index, val) {
            $(val).toggle(private && !($(val).hasClass('inherited_from') && !inherited));
        });
      }

      $(document).ready(function() {
        $('a.gripper').click(function() {
            $(this).nextAll('div.code-tabs').slideToggle();
            $(this).children('img').toggle();
            return false;
        });

        $('div.method code span.highlight,div.function code span.highlight,div.constant code span.highlight,div.property code span.highlight').css('cursor', 'pointer');

        $('div.method code span.highlight,div.function code span.highlight,div.constant code span.highlight,div.property code span.highlight').click(function() {
            $(this).parent().nextAll('div.code-tabs').slideToggle();
            $(this).parent().prevAll('a.gripper').children('img').toggle();
            return false;
        });

        $('div.code-tabs').hide();
        $('a.gripper').show();
        $('div.code-tabs:empty').prevAll('a.gripper').html('');

        $('#show-public, #show-protected, #show-private, #show-inherited')
            .css('cursor', 'pointer')
            .click(function(){
                $(this).toggleClass('deselected');
                if ($(this).hasClass('deselected')) {
                  $(this).fadeTo('fast', '0.4');
                } else {
                  $(this).fadeTo('fast', '1.0');
                }
                filterElements();
                return false;
            });
        $('#show-protected, #show-private').click();

        // add the sliding behaviour to the file navigation and show it
        // it is initially hidden for non-JS users.
        $("#file-nav-box").show().hover(function() {
            $("#file-nav-container").slideDown(400);
        }, function() {
            $("#file-nav-container").slideUp(400);
        });
      });

      
    </script><h1 xmlns:dbx="http://docblox-project.org/xsl/functions" class="file">types/DataType.php</h1>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" id="file-nav-box">
<div id="file-nav-options">
              Show:
              <img src="images/icons/visibility_public.png" id="show-public"><img src="images/icons/visibility_protected.png" id="show-protected"><img src="images/icons/visibility_private.png" id="show-private"><span class="attribute" id="show-inherited">inherited</span>
</div>
<div id="file-nav-container">
<ul id="file-nav"><li>
<a href="#classes"><img src="images/icons/class.png" height="14">
                          Classes
                      </a><ul><li><a href="#%5CDataType">\DataType</a></li></ul>
</li></ul>
<div style="clear: left;"></div>
</div>
<div id="file-nav-tab">
              Table of Contents
          </div>
</div>
<a xmlns:dbx="http://docblox-project.org/xsl/functions" name="top" class="anchor"></a><a name="classes" class="anchor"></a><a xmlns:dbx="http://docblox-project.org/xsl/functions" id="\DataType" class="anchor"></a><h2 xmlns:dbx="http://docblox-project.org/xsl/functions" class="class">\DataType<div class="to-top"><a href="#top">jump to top</a></div>
</h2>
<div xmlns:dbx="http://docblox-project.org/xsl/functions" class="class">
<small class="package"><b>Package: </b>phing\types</small><p class="short-description">Base class for those classes that can appear inside the build file
as stand alone data types.</p>
<div class="long-description"><p>This class handles the common description attribute and provides
a default implementation for reference handling and checking for
circular references that is appropriate for types that can not be
nested inside elements of the same type (i.e. patternset but not path)</p></div>
<dl class="class-info">
<dt>Parent(s)</dt>
<dd><a href="db_ProjectComponent.html#%5CProjectComponent">\ProjectComponent</a></dd>
<dt>Children</dt>
<dd><a href="db_tasks_ext_PhpCodeSnifferTask.html#%5CPhpCodeSnifferTask_FormatterElement">\PhpCodeSnifferTask_FormatterElement</a></dd>
<dd><a href="db_types_Parameter.html#%5CParameter">\Parameter</a></dd>
<dd><a href="db_types_TokenSource.html#%5CTokenSource">\TokenSource</a></dd>
<dd><a href="db_types_PhingFilterReader.html#%5CPhingFilterReader">\PhingFilterReader</a></dd>
<dd><a href="db_types_Excludes.html#%5CExcludes">\Excludes</a></dd>
<dd><a href="db_types_FilterChain.html#%5CFilterChain">\FilterChain</a></dd>
<dd><a href="db_types_Mapper.html#%5CMapper">\Mapper</a></dd>
<dd><a href="db_types_RegularExpression.html#%5CRegularExpression">\RegularExpression</a></dd>
<dd><a href="db_types_AbstractFileSet.html#%5CAbstractFileSet">\AbstractFileSet</a></dd>
<dd><a href="db_types_Description.html#%5CDescription">\Description</a></dd>
<dd><a href="db_types_Path.html#%5CPath">\Path</a></dd>
<dd><a href="db_types_PatternSet.html#%5CPatternSet">\PatternSet</a></dd>
<dd><a href="db_types_FileList.html#%5CFileList">\FileList</a></dd>
<dd><a href="db_types_selectors_BaseSelector.html#%5CBaseSelector">\BaseSelector</a></dd>
</dl>
<h3>Properties</h3>
<div>
<a id="\DataType::$checked" class="anchor"></a><div class="property protected">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected">boolean
                 <span class="highlight">$checked</span>= 'true'
                </code><div class="description">
<p class="short-description">Are we sure we don't hold circular references?</p></div>
<div class="code-tabs">
<div class="long-description"><p>Subclasses are responsible for setting this value to false
if we'd need to investigate this condition (usually because a
child element has been added that is a subclass of DataType).</p></div>
<strong>Default value</strong><code>true</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>boolean</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\DataType::$description" class="anchor"></a><div class="property public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public">
                 <span class="highlight">$description</span>= 'null'
                </code><div class="description"><p class="short-description">The descriptin the user has set.</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Default value</strong><code>null</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>n/a</dd>
</dl>
</div>
<div class="clear"></div>
</div>
<a id="\DataType::$ref" class="anchor"></a><div class="property public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/property.png" alt="Property"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public">
                 <span class="highlight">$ref</span>= 'null'
                </code><div class="description"><p class="short-description">Value to the refid attribute. Type of Reference</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Default value</strong><code>null</code><strong>Details</strong><dl class="property-info">
<dt>Type</dt>
<dd>n/a</dd>
</dl>
</div>
<div class="clear"></div>
</div>
</div>
<h3>Methods</h3>
<div>
<a id="\DataType::circularReference()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">circularReference</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Creates an exception that indicates the user has generated a
loop of data types referencing each other.</p></div>
<div class="code-tabs"><div class="long-description"></div></div>
<div class="clear"></div>
</div>
<a id="\DataType::dieOnCircularReference()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">dieOnCircularReference</span><span class="nb-faded-text">(
           $stk,  $p
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Check to see whether any DataType we hold references to is
included in the Stack (which holds all DataType instances that
directly or indirectly reference this instance, including this
instance itself).</p></div>
<div class="code-tabs">
<div class="long-description"><p>If one is included, throw a BuildException created by circularReference</p>

<p>This implementation is appropriate only for a DataType that
cannot hold other DataTypes as children.</p>

<p>The general contract of this method is that it shouldn't do
anything if checked is true and set it to true on exit.</p></div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$stk</th>
<td></td>
<td><em></em></td>
</tr>
<tr>
<th>$p</th>
<td></td>
<td><em></em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\DataType::getCheckedRef()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">getCheckedRef</span><span class="nb-faded-text">(
           $requiredClass,  $dataTypeName
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Performs the check for circular references and returns the referenced object.</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$requiredClass</th>
<td></td>
<td><em></em></td>
</tr>
<tr>
<th>$dataTypeName</th>
<td></td>
<td><em></em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\DataType::getDescription()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">getDescription</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Return the description for the current data type.</p></div>
<div class="code-tabs"><div class="long-description"></div></div>
<div class="clear"></div>
</div>
<a id="\DataType::getProject()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">getProject</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description"></p></div>
<div class="code-tabs"></div>
<div class="clear"></div>
</div>
<a id="\DataType::isReference()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">isReference</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Has the refid attribute of this element been set?</p></div>
<div class="code-tabs"><div class="long-description"></div></div>
<div class="clear"></div>
</div>
<a id="\DataType::log()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">log</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description"></p></div>
<div class="code-tabs"></div>
<div class="clear"></div>
</div>
<a id="\DataType::noChildrenAllowed()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">noChildrenAllowed</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Creates an exception that indicates that this XML element must
not have child elements if the refid attribute is set.</p></div>
<div class="code-tabs"><div class="long-description"></div></div>
<div class="clear"></div>
</div>
<a id="\DataType::parsingComplete()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">parsingComplete</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Template method being called when the data type has been
parsed completely.</p></div>
<div class="code-tabs"><div class="long-description"></div></div>
<div class="clear"></div>
</div>
<a id="\DataType::setDescription()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">setDescription</span><span class="nb-faded-text">(
           $desc
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Sets a description of the current data type. It will be useful
in commenting what we are doing.</p></div>
<div class="code-tabs">
<div class="long-description"></div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$desc</th>
<td></td>
<td><em></em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\DataType::setProject()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">setProject</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description"></p></div>
<div class="code-tabs"></div>
<div class="clear"></div>
</div>
<a id="\DataType::setRefid()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">setRefid</span><span class="nb-faded-text">(
          <a href="db_types_Reference.html#%5CReference">\Reference</a> $r
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Set the value of the refid attribute.</p></div>
<div class="code-tabs">
<div class="long-description"><p>Subclasses may need to check whether any other attributes
have been set as well or child elements have been created and
thus override this method. if they do they must call parent::setRefid()</p></div>
<strong>Parameters</strong><table class="argument-info">
<thead><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr></thead>
<tr>
<th>$r</th>
<td><a href="db_types_Reference.html#%5CReference">\Reference</a></td>
<td><em></em></td>
</tr>
</table>
</div>
<div class="clear"></div>
</div>
<a id="\DataType::tooManyAttributes()" class="anchor"></a><div class="method public">
<a href="#" class="gripper"><img src="images/icons/arrow_right.png"><img src="images/icons/arrow_down.png" style="display: none;"></a><code><img src="images/icons/method.png" alt="method"><img src="images/icons/visibility_public.png" style="margin-right: 5px" alt="public"><span class="highlight">tooManyAttributes</span><span class="nb-faded-text">(
          
          )
        </span>
        :
          void</code><div class="description"><p class="short_description">Creates an exception that indicates that refid has to be the
only attribute if it is set.</p></div>
<div class="code-tabs"><div class="long-description"></div></div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<small xmlns="" class="footer">Documentation was generated by <a href="http://docblox-project.org">DocBlox 0.17.1</a>.
    </small></body></html>
